<?php 
if(!defined('ADMIN')){
	exit('Access Denied');
}

$act_arr=array('list','addedi','del','set');
?>
<div class="pageContent">
<form action="index.php?mod=<?=MOD?>&act=<?=ACT?>" method="post"  class="pageForm required-validate"  name="form1" onsubmit="return validateCallback(this, dialogAjaxDone);">
<input type="hidden" name="id" value="<?=$row['id']?>" />
<input type="hidden" name="modelid" value="<?=$row['modelid']?>" />

<input type="hidden" name="sub" value="save" />
<div class="pageFormContent" layoutH="60">
<p><label>字段类型：</label>
<?=select($formtype_arr,$row['formtype'],'formtype')?>
</p>
<p><label>字段名：</label>
<input name="field" type="text" size="20"  id="field" value="<?=$row['field']?>" class="alphanumeric required"  remote="index.php?mod=<?=MOD?>&act=<?=ACT?>&modelid=<?=$row['modelid']?>&id=<?=$row['id']?>&do=check" />&nbsp;&nbsp;<span>由字母、数字和下划线组成，且划线不在头尾</span></p>
<p><label>别名：</label>
<input name="name" type="text" size="20"  id="name" value="<?=$row['name']?>" class="required" />&nbsp;<span></span></p>
<p><label>字段提示：</label>
<input name="tips" type="text" size="50"  id="tips" value="<?=$row['tips']?>" /></p>
<p><label>文本框长度：</label>
<input name="inputsize" type="text" size="20"  id="inputsize" value="<?=$row['inputsize']?>" /></p>
<p><label>默认值：</label>
<input name="defaultval" type="text" size="20"  id="defaultval" value="<?=$row['defaultval']?>" /></p>
<p><label>必填：</label>
<input type="radio" name="isrequired" value="1" <? if($row["isrequired"]==1){ echo "checked";}?> /> 是 <input type="radio" name="isrequired" <? if($row["isrequired"]==0){ echo "checked";}?> value="0" /> 否&nbsp;<span></span></p>
<p><label>附属字段：</label>
<input type="radio" name="iscompose" value="1" <? if($row["iscompose"]==1){ echo "checked";}?> /> 是 <input type="radio" name="iscompose" <? if($row["iscompose"]==0){ echo "checked";}?> value="0" /> 否&nbsp;&nbsp;<span>只出现在组合字段中，不单独显示</span></p>

<p><label>编辑权限：</label>
<input type="radio" name="isadmin" value="0" <? if($row["isadmin"]==0){ echo "checked";}?> /> 可编辑 <input type="radio" name="isadmin" <? if($row["isadmin"]==1){ echo "checked";}?> value="1" /> 只读  <input type="radio" name="isadmin" <? if($row["isadmin"]==2){ echo "checked";}?> value="2" /> 隐藏&nbsp;&nbsp;<span>是否用户编辑</span></p>


<p style="height: 45px;"><label>自定义表单：</label>

<textarea name="forminfo" rows="2" cols="20" id="forminfo" style="height:40px; width:80%"><?=$row["forminfo"]?></textarea>
</p>
<p><label>&nbsp;</label>
<span>为空时，显示系统默认表单</span></p>
</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
</form>
</div>
